cmake_minimum_required(VERSION 3.5.1)
project(Queue)

if(BUILD_TOTAL STREQUAL ON)
	set(SEQUEUE_SRC SeQueue/sequeue.c)
	set(LINQUEUE_SRC LinQueue/linqueue.c)

	set(QUEUE_SRC ${SEQUEUE_SRC} ${LINQUEUE_SRC})

	add_library(LQueue STATIC ${QUEUE_SRC})
	add_library(lqueue SHARED ${QUEUE_SRC})

	install(TARGETS LQueue ARCHIVE DESTINATION ${INSTALL_DIR}/lib/liblds)
	install(TARGETS lqueue LIBRARY DESTINATION ${INSTALL_DIR}/lib/${CMAKE_LIBRARY_ARCHITECTURE})
	install(FILES ${INCLUDE_DIR}/Queue/*.h DESTINATION ${INSTALL_DIR}/include/liblds)
else()
	add_subdirectory(SeQueue/) # Sequence List Queue 基于顺序表的队列
	add_subdirectory(LinQueue/) # Linked List Queue  基于链表的队列
endif()
